Nested IF statements in Excel [Over the 7 allowed limit]
Posted
by Alks
on Stack Overflow
See other posts from Stack Overflow
or by Alks
Published on 2010-03-17T19:42:46Z
Indexed on
2010/03/17
19:51 UTC
Read the original article
Hit count: 189
hey guys, i am trying to create a spreadsheet which automagically gives a grade to a student based on their marks they got.
I've apparently hit excels nested IF statement limit which is 7.
here's my if statement:
=IF(O5>0.895,"A+",IF(O5>0.845,"A",IF(O5>0.795,"A-",IF(O5>0.745,"B+",IF(O5>0.695,"B",IF(O5>0.645,"B-",IF(O5>0.595,"C+",IF(O5>0.545,"C","D"))))))))
I was reading online that I could create a VBA script and assign it that, but I dont know anything about VBA....so if someone could help me write a VBA for this, would be awesome.
Its still mising the C- grade and anything lower should be awarded a D mark.
This is the grading scheme I am trying to create...:
A+ 89.500 - 100.000 Pass with Distinction
A 84.500 - 89.490 Pass with Distinction
A- 79.500 - 84.490 Pass with Distinction
B+ 74.500 - 79.490 Pass with Merit
B 69.500 - 74.490 Pass with Merit
B- 64.500 - 69.490 Pass with Merit
C+ 59.500 - 64.490 Pass
C 54.500 - 59.490 Pass
C- 49.500 - 54.490 Pass
D 0.000 - 49.490 Specified Fail
I wouldn't mind going down the VBA route, however my understanding of VB language is absolutely minimal (don't like it)...if this gets too tedious, I was thinking to create a small php/mysql application instead.
Cheers :)
© Stack Overflow or respective owner